<?php if ($listActions = $this->configuration->getValue('cart.batch_actions')): ?>
<li class="sf_admin_batch_actions_choice">

  <?php foreach ($listActions as $action => $params): ?>
    <?php if (isset($params['condition'])): ?>
    <input type="hidden" name="batch_conditions[<?php echo $action ?>]" id="batch_conditions_<?php echo $action ?>" value="<?php echo $params['condition'] ?>" />
    <?php endif ?>
  <?php endforeach ?>

  <select id="batch_action" name="batch_action">
    <option value="">[?php echo __('Choose an action', array(), 'sf_admin') ?]</option>
<?php foreach ((array) $listActions as $action => $params): ?>
    <?php echo $this->addCredentialCondition('<option value="'.$action.'">[?php echo __(\''.$params['label'].'\', array(), \'sf_admin\') ?]</option>', $params) ?>

<?php endforeach; ?>
  </select>
  [?php $form = new sfForm(); if ($form->isCSRFProtected()): ?]
    <input type="hidden" name="[?php echo $form->getCSRFFieldName() ?]" value="[?php echo $form->getCSRFToken() ?]" />
  [?php endif; ?]
  <input type="submit" value="[?php echo __('go', array(), 'sf_admin') ?]" onclick="if (!$('batch_action').getValue()) return false;"  />
</li>
<?php endif; ?>
